#pragma once
#include "Type.h"


// ArrowType command target

class ArrowType : public Type
{

public:
	typedef const ArrowType& const_reference;

protected:
	TokenPair LeftRight;

public:
	bool isArrowType() const {return true;};


public:
	//Token Overides
	Token::pointer applyArgument(Token::const_reference)  const;
	Token::pointer clone( void ) const;
	string view() const ;
	string toString() const;
	bool operator==(Token::const_reference) const;
	Token::pointer replaceAll(Token::const_reference, Token::const_reference) const;
	size_t complexity( ) const;

public:
	//Type Overides
	bool hasSubType(Type::const_reference Ty) const;

public:
	Type::const_reference getRight()  const{return static_cast<Type::const_reference>(*(LeftRight.second));};
	Type::const_reference getLeft()   const{return static_cast<Type::const_reference>(*(LeftRight.first));};
	const Type& FunctionTo() const;

public :	
	ArrowType(const Type&, const Type&, const string& = "");
	ArrowType(const TokenPair&, const string& ="");
	ArrowType(const ArrowType&);
	virtual ~ArrowType();
	

};



